#!/bin/sh

gap -q -m 8g << EOI
LoadPackage("DifSets");;
output := DifferenceSets(SmallGroup($1, $2));;
t := StringTime(time);;
len := Length(output);;
f := "$1-$2.txt";;
PrintTo(f, "## Group: [$1, $2]\n## Difference Sets: ", len, "\n## Time: ", t, "\n\n");;
AppendTo(f, "return [\n");;
for i in [1..Length(output)] do
	AppendTo(f, output[i]);;
	if i < Length(output) then AppendTo(f, ",");; fi;;
	AppendTo(f, "\n");;
od;;
AppendTo(f, "];\n\n");;
EOI

